# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-pytest
pkgver=5.4.3
pkgrel=0
pkgdesc="Python3 testing library"
url="https://docs.pytest.org/en/latest/"
arch="noarch"
license="MIT"
depends="py3-atomicwrites py3-py py3-six py3-attrs py3-more-itertools py3-pluggy py3-wcwidth
	py3-setuptools py3-packaging"
source="https://files.pythonhosted.org/packages/source/p/pytest/pytest-$pkgver.tar.gz"
builddir="$srcdir/pytest-$pkgver"

replaces="pytest" # Backwards compatibility
provides="pytest=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 setup.py check
}

package() {
	mkdir -p "$pkgdir"/usr/bin

	local name; for name in py.test pytest; do
		ln -s $name-3 "$pkgdir"/usr/bin/$name
	done

	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="0a07d4f4f791969c6f21961a0ba0f8c6670e5870c6cc1cebf93766587bb9cb3e10db8e57f0bd33dd22b275f3aad7aa674949f124ac80e0ccca64e35be4beee4e  pytest-5.4.3.tar.gz"
